<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> 运营分析 </title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="form-group row">
        <label class="col-sm-2 control-label">筛选</label>

        <div class="col-sm-4">
            <select class="form-control m-b" name="account">
                <option>洪山区</option>
                <option>武昌区</option>
                <option>江汉区</option>
                <option>江岸区</option>
            </select>
        </div>
        <div class="col-sm-4">
            <select class="form-control m-b" name="account">
                <option>辖区1</option>
                <option>辖区2</option>
                <option>辖区3</option>
                <option>辖区4</option>
            </select>
        </div>
        <div class="col-sm-2">
            <button type="button" class="btn btn-w-m btn-info">确认</button>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-3">
            <div class="widget style1 navy-bg">
                <div class="row">
                    <div class="col-xs-4">
                        <i class="fa fa-cloud fa-5x"></i>
                    </div>
                    <div class="col-xs-8 text-right">
                        <span> 注册商户数 </span>
                        <h2 class="font-bold">3021</h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="widget style1 lazur-bg">
                <div class="row">
                    <div class="col-xs-4">
                        <i class="fa fa-envelope-o fa-5x"></i>
                    </div>
                    <div class="col-xs-8 text-right">
                        <span> 使用电信宽带 </span>
                        <h2 class="font-bold">1300</h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="widget style1 yellow-bg">
                <div class="row">
                    <div class="col-xs-4">
                        <i class="fa fa-music fa-5x"></i>
                    </div>
                    <div class="col-xs-8 text-right">
                        <span> 电信宽带占比 </span>
                        <h2 class="font-bold">35%</h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="widget style1" style="background-color: #06cd3e;color: #fff">
                <div class="row">
                    <div class="col-xs-4">
                        <i class="fa fa-music fa-5x"></i>
                    </div>
                    <div class="col-xs-8 text-right">
                        <span> 同比(上周) </span>
                        <h2 class="font-bold">+2%</h2>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>宽带运营商分布</h5>
                </div>
                <div class="ibox-content">
                    <!-- 饼状图 -->
                    <div id="chart1" style="width: 100%;height:300px;"></div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>商户类型分布</h5>
                </div>
                <div class="ibox-content">
                    <!-- 饼状图 -->
                    <div id="chart2" style="width: 100%;height:300px;"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>宽带到期提醒</h5>
                </div>
                <div class="ibox-content">

                    <table class="table table-striped table-bordered table-hover dataTables-terminalInfo">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>商家编号</th>
                            <th>商家名称</th>
                            <th>商家地址</th>
                            <th>联系电话</th>
                            <th>宽带运营商</th>
                            <th>到期时间</th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>

                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>

<!-- Data Tables -->
<script src="js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>
<!-- echarts -->
<script src="js/echarts.min.js"></script>
<!-- 自定义js -->
<script src="js/content.js?v=1.0.0"></script>


<!-- Page-Level Scripts -->
<script type="text/javascript">
    $(function () {
        $('.dataTables-terminalInfo').dataTable({
            "aaSorting": [
                [1, "desc"]
            ], //默认第几个排序
            "bStateSave": true, //状态保存
            "pading": false,
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                {
                    "orderable": false
                } // 不参与排序的列
            ],
            "ajax": {
                "url": "data/om-analysis.json"
            },
            "columns": [
                {"data": "ID"},
                {"data": "NetSite_Type"},
                {"data": "NetSite_Num"},
                {"data": "NetSite_Amount"},
                {"data": "T_Compared"},
                {"data": "kd_fac"},
                {"data": "H_Compared"}
            ]
        });
        chart1();
        chart2();
        function chart1() {
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById('chart1'));
            // 指定图表的配置项和数据
            var option = {
                tooltip: {
                    trigger: 'item',
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                legend: {
                    orient: 'vertical',
                    left: 'right',
                    data: ['电信', '移动', '联通', '长城']
                },
                series: [
                    {
                        name: '宽带占比',
                        type: 'pie',
                        radius: '55%',
                        center: ['50%', '60%'],
                        data: [
                            {value: 130, name: '电信'},
                            {value: 43, name: '移动'},
                            {value: 78, name: '联通'},
                            {value: 40, name: '长城'}
                        ],
                        itemStyle: {
                            emphasis: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: 'rgba(0, 0, 0, 0.5)'
                            }
                        }
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
        }

        function chart2() {
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById('chart2'));
            // 指定图表的配置项和数据
            var option = {
                color: ['#3398DB'],
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                        type: 'line'        // 默认为直线，可选为：'line' | 'shadow'
                    }
                },
                grid: {
                    left: '3%',
                    right: '4%',
                    bottom: '3%',
                    containLabel: true
                },
                xAxis: [
                    {
                        type: 'category',
                        data: ['宾馆', '图书', '电脑', '娱乐', '交通枢纽', '公共交通', '餐饮', '金融', '购物', '公共服务', '文化服务', '公共休闲'],
                        axisTick: {
                            alignWithLabel: true
                        }
                    }
                ],
                yAxis: [
                    {
                        type: 'value'
                    }
                ],
                series: [
                    {
                        name: '直接访问',
                        type: 'bar',
                        barWidth: '60%',
                        data: [10, 52, 200, 334, 390, 330, 220, 311, 134, 123, 421, 212]
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
        }

    })
</script>

</body>

</html>
